package com.shjn.squirrel.model;

import com.shjn.squirrel.R;

import java.util.HashMap;
import java.util.Map;

/**
 * 常量
 */
public class Constant {

    private Constant() {
    }

    /**
     * 网络接口基地址1
     */
    public static final String baseUrl = "https://api.nyanyac.top/";
    /**
     * 网络接口基地址2
     */
    public static final String myBaseUrl = "http://47.242.16.20/";
    /**
     * 垃圾投递开始时间
     */
    public static final String startTime = "0:00";
    /**
     * 垃圾投递结束时间
     */
    public static final String endTime = "23:59";
    /**
     * 垃圾分类桶超重阈值
     */
    public static final double weightLimit = 40;//40kg

    /**
     * 饮料瓶满桶阈值
     */
    public static final int bottleLimit = 200;//200个

    /**
     * 垃圾价格更新周期
     */
    public static final int priceUpdateCycle = 30;//30分钟

    /**
     * 垃圾种类
     */
    public static final String bottle = "饮料瓶";

    public static final String paper = "纸类";

    public static final String book = "书籍";

    public static final String plastic = "塑料";

    public static final String fabric = "纺织物";

    public static final String metal = "金属";

    public static final String glass = "玻璃";

    public static final String harm = "有害垃圾";

    /**
     * 满箱状态
     */
    public static final String full = "满箱";

    public static final String full_80 = "80%";

    public static final String full_no = "未满箱";

    /**
     * 数量单位
     */
    public static final String quantity_unit = "个";

    /**
     * 次数单位
     */
    public static final String count_unit = "次";

    /**
     * 重量单位
     */
    public static final String weight_unit = "公斤";

    /**
     * 获得积分
     */
    public static final String get_integral = "获得环保积分";

    /**
     * 获得环保金
     */
    public static final String get_money = "获得环保金";

    /**
     * 垃圾种类---->布局文件、图片资源、垃圾编号的映射关系
     */
    public static final Map<String, int[]> categoryMap = new HashMap<>();

    /**
     * 垃圾编号---->投口编号的映射关系
     */
    public static final Map<Integer, Integer> numberMap = new HashMap<>();

    static {

        categoryMap.put(Constant.bottle,
                new int[]{R.layout.user_imgs_bottle, R.drawable.bottle, R.drawable.bottle_small, 1});
        numberMap.put(1, 6);

        categoryMap.put(Constant.paper,
                new int[]{R.layout.user_imgs_paper, R.drawable.paper, R.drawable.paper_small, 2});
        numberMap.put(2, 3);

        categoryMap.put(Constant.book,
                new int[]{R.layout.user_imgs_book, R.drawable.book, R.drawable.book_small, 3});
        numberMap.put(3, 4);

        categoryMap.put(Constant.plastic,
                new int[]{R.layout.user_imgs_plastic, R.drawable.plastic, R.drawable.plastic_small_shape, 4});
        numberMap.put(4, 1);

        categoryMap.put(Constant.fabric,
                new int[]{R.layout.user_imgs_fabric, R.drawable.fabric, R.drawable.fabric_small, 5});
        numberMap.put(5, 0);

        categoryMap.put(Constant.metal,
                new int[]{R.layout.user_imgs_metal, R.drawable.metal, R.drawable.metal_small, 6});
        numberMap.put(6, 2);

        categoryMap.put(Constant.glass,
                new int[]{R.layout.user_imgs_glass, R.drawable.glass, R.drawable.glass_small, 7});
        numberMap.put(7, 5);

        categoryMap.put(Constant.harm,
                new int[]{R.layout.user_imgs_harm, R.drawable.harm, R.drawable.harm_small, 8});
        numberMap.put(8, 5);


    }

}
